const mongoose = require('mongoose')

/**
 * 用户类
 */
const UserSchema = mongoose.Schema({
    username: { 
        type: String, 
        require: true, 
        unique: true, 
        index: true 
    },
    pwd: { 
        type: String, 
        require: true, 
    }
})

const User = mongoose.model('user', UserSchema)

module.exports = User
